home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / online / ibrowse_plugins / openurl / developer / c / include / libraries / openurl.h
C/C++ Source or Header  |  2004-08-03  |  5KB  |  143 lines

  1. #ifndef LIBRARIES_OPENURL_H
  2. #define LIBRARIES_OPENURL_H
  3.  
  4. /*
  5. **  $VER: openurl.h 4.4 (1.3.2003)
  6. **  Includes Release 4.4
  7. **
  8. **  openurl.library - universal URL display and browser
  9. **  launcher library
  10. **
  11. **  Written by Troels Walsted Hansen <troels@thule.no>
  12. **  Placed in the public domain.
  13. **
  14. **  Developed by:
  15. **  - Alfonso Ranieri <alforan@tin.it>
  16. **  - Stefan Kost <ensonic@sonicpulse.de>
  17. **
  18. */
  19.  
  20. #ifndef EXEC_TYPES_H
  21. #include <exec/types.h>
  22. #endif
  23.  
  24. #ifndef EXEC_LISTS_H
  25. #include <exec/lists.h>
  26. #endif
  27.  
  28. #ifndef EXEC_NODES_H
  29. #include <exec/nodes.h>
  30. #endif
  31.  
  32. #ifndef UTILITY_TAGITEM_H
  33. #include <utility/tagitem.h>
  34. #endif
  35.  
  36. /**************************************************************************/
  37. /*
  38. ** Tags
  39. */
  40.  
  41. #define URL_Tagbase          TAG_USER
  42.  
  43. #define URL_Show             (URL_Tagbase + 1) /* BOOL - show/uniconify browser */
  44. #define URL_BringToFront     (URL_Tagbase + 2) /* BOOL - bring browser to front */
  45. #define URL_NewWindow        (URL_Tagbase + 3) /* BOOL - open URL in new window */
  46. #define URL_Launch           (URL_Tagbase + 4) /* BOOL - launch browser when not running */
  47. #define URL_PubScreenName    (URL_Tagbase + 5) /* STRPTR - name of public screen to launch at */
  48.  
  49. #define URL_GetPrefs_Default (URL_Tagbase + 20)
  50. #define URL_SetPrefs_Save    (URL_Tagbase + 30)
  51.  
  52. /**************************************************************************/
  53. /*
  54. ** Version 3 Prefs
  55. */
  56.  
  57. #define PREFS_VERSION ((UBYTE)3)
  58.  
  59. struct URL_Prefs
  60. {
  61.     UBYTE          up_Version;         /* always check this version number! */
  62.     struct MinList up_BrowserList;     /* list of struct URL_BrowserNodes */
  63.     struct MinList up_MailerList;      /* V3 - list of struct URL_MailerNodes */
  64.  
  65.     LONGBITS       up_Flags;           /* V2 - flags, see below            */
  66.     BOOL           up_DefShow;         /* these BOOLs are the defaults for */
  67.     BOOL           up_DefBringToFront; /* the similarly named tags         */
  68.     BOOL           up_DefNewWindow;    /* they are all new with Version 2  */
  69.     BOOL           up_DefLaunch;
  70. };
  71.  
  72. /* up_Flags */
  73. enum
  74. {
  75.     UPF_ISDEFAULTS  = 1<<0, /* V2 - structure contains the default settings             */
  76.     UPF_PREPENDHTTP = 1<<1, /* V3 - prepend "http://" to URLs w/o scheme                */
  77.     UPF_DOMAILTO    = 1<<2, /* V3 - mailto: URLs get special treatment                  */
  78. };
  79.  
  80. /**************************************************************************/
  81. /*
  82. ** Browsers
  83. */
  84.  
  85. #define REXX_CMD_LEN         64
  86.  
  87. #define UBN_NAME_LEN         32
  88. #define UBN_PATH_LEN         256
  89. #define UBN_PORT_LEN         32
  90. #define UBN_SHOWCMD_LEN      REXX_CMD_LEN
  91. #define UBN_TOFRONTCMD_LEN   REXX_CMD_LEN
  92. #define UBN_OPENURLCMD_LEN   REXX_CMD_LEN
  93. #define UBN_OPENURLWCMD_LEN  REXX_CMD_LEN
  94.  
  95. struct URL_BrowserNode
  96. {
  97.     struct MinNode ubn_Node;
  98.     LONGBITS       ubn_Flags;                            /* flags, see below */
  99.     TEXT           ubn_Name[UBN_NAME_LEN];               /* name of webbrowser */
  100.     TEXT           ubn_Path[UBN_PATH_LEN];               /* complete path to browser */
  101.     TEXT           ubn_Port[UBN_PORT_LEN];               /* webbrowser arexx port */
  102.     TEXT           ubn_ShowCmd[UBN_SHOWCMD_LEN];         /* command to show/uniconify browser */
  103.     TEXT           ubn_ToFrontCmd[UBN_TOFRONTCMD_LEN];   /* command to bring browser to front */
  104.     TEXT           ubn_OpenURLCmd[UBN_OPENURLCMD_LEN];   /* command to open url */
  105.     TEXT           ubn_OpenURLWCmd[UBN_OPENURLWCMD_LEN]; /* command to open url in new window */
  106. };
  107.  
  108. /* ubn_Flags */
  109. enum
  110. {
  111.     UBNF_URLONCMDLINE = 1<<0,    /* if set, browser supports getting an URL on
  112.                                     the commandline when launched. obsolete as
  113.                                     of V3 - use %u on commandline instead */
  114. };
  115.  
  116. /**************************************************************************/
  117. /*
  118. ** Mailers
  119. */
  120.  
  121. #define UMN_NAME_LEN         32
  122. #define UMN_PATH_LEN         256
  123. #define UMN_PORT_LEN         32
  124. #define UMN_SHOWCMD_LEN      REXX_CMD_LEN
  125. #define UMN_TOFRONTCMD_LEN   REXX_CMD_LEN
  126. #define UMN_WRITEMAILCMD_LEN (REXX_CMD_LEN * 2)
  127.  
  128. struct URL_MailerNode
  129. {
  130.     struct MinNode umn_Node;
  131.     LONGBITS       umn_Flags;                              /* flags, none defined */
  132.     TEXT           umn_Name[UMN_NAME_LEN];                 /* name of mailer */
  133.     TEXT           umn_Path[UMN_PATH_LEN];                 /* complete path to mailer */
  134.     TEXT           umn_Port[UMN_PORT_LEN];                 /* mailer arexx port */
  135.     TEXT           umn_ShowCmd[UMN_SHOWCMD_LEN];           /* command to show/uniconify mailer */
  136.     TEXT           umn_ToFrontCmd[UMN_TOFRONTCMD_LEN];     /* command to bring mailer to front */
  137.     TEXT           umn_WriteMailCmd[UMN_WRITEMAILCMD_LEN]; /* command to write mail */
  138. };
  139.  
  140. /**************************************************************************/
  141.  
  142. #endif /* LIBRARIES_OPENURL_H */
  143.